home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
5_9.lha
/
5_9
/
5_9b1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-08
|
413b
|
19 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ char_stack class as defined in section 5.2.5
lass char_stack
int size;
char *top;
char *s;
ublic:
char_stack(int sz) { top = s = new char[size=sz]; }
~char_stack() { delete s; }
void push(char c) { *top++ = c; }
char pop() { return *--top; }
;